import React from 'react'

import './style.scss'

class HomeAdd extends React.Component{
    constructor(props){
        super(props)
    }
    render() {
        const data = this.props.data
        return (
            <div className="homeAdd clearfix">
                <h2>全球热卖</h2>
                <div className='listswarp'>
                    {data.map((item, index) => {
                        return <div key={index} className="list">
                            <a href={item.link}>
                                <img src={item.img}/>
                            </a>
                        </div>
                    })}
                </div>
            </div>
        )
    }
    componentDidMount() {
        // console.log(this.props.data)
    }
}

export default HomeAdd